<?php
/**
 * Option element
 *
 */
class ArrowFormOption extends ArrowTag{
	
	public function configure(){
		parent::configure();	
		$this->addProperties(array(
				"label" => false,
				"value" => null,
				"selected" => 0
		));
		$this->addRequiredProperties(array("value"));
		$this->setDisplay(false);
	}	
	
	public function getValue(){
		return $this->getProperty("value");
	}
	public function getLabel(){
		$label = $this->getProperty("label");
		if( $label )
			return $label;
			
		return $this->getProperty("value");
	}
	public function isSelected(){
		return (bool) $this->getProperty("selected");
	}
	
}
?>